/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.marlboroug.entity;

import java.io.Serializable;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;
import javax.validation.constraints.NotNull;
import javax.xml.bind.annotation.XmlRootElement;


@Entity
@Table(name = "Parameters")
@XmlRootElement
@NamedQueries({
    @NamedQuery(name = "Parameters.findAll", query = "SELECT p FROM Parameters p"),
    @NamedQuery(name = "Parameters.findByIDparameters", query = "SELECT p FROM Parameters p WHERE p.iDparameters = :iDparameters"),
    @NamedQuery(name = "Parameters.findByArticlePage", query = "SELECT p FROM Parameters p WHERE p.articlePage = :articlePage")})
public class Parameters implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Basic(optional = false)
    @Column(name = "ID_parameters")
    private Long iDparameters;
    @Basic(optional = false)
    @NotNull
    @Column(name = "article_page")
    private int articlePage;

    public Parameters() {
    }

    public Parameters(Long iDparameters) {
        this.iDparameters = iDparameters;
    }

    public Parameters(Long iDparameters, int articlePage) {
        this.iDparameters = iDparameters;
        this.articlePage = articlePage;
    }

    public Long getIDparameters() {
        return iDparameters;
    }

    public void setIDparameters(Long iDparameters) {
        this.iDparameters = iDparameters;
    }

    public int getArticlePage() {
        return articlePage;
    }

    public void setArticlePage(int articlePage) {
        this.articlePage = articlePage;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (iDparameters != null ? iDparameters.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof Parameters)) {
            return false;
        }
        Parameters other = (Parameters) object;
        if ((this.iDparameters == null && other.iDparameters != null) || (this.iDparameters != null && !this.iDparameters.equals(other.iDparameters))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "com.marlboroug.entity.Parameters[ iDparameters=" + iDparameters + " ]";
    }
    
}
